package com.example.demo2;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import java.util.ArrayList;

public class fwMainActivity extends AppCompatActivity {

    private Button button,bn1,bn2,bn3,bu5;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fw_main);
        button = (Button)findViewById(R.id.but4);
        bn1 = (Button)findViewById(R.id.bu1);
        bn2 = (Button)findViewById(R.id.bu2);
        bn3 = (Button)findViewById(R.id.bu3);
        bu5 = (Button)findViewById(R.id.bu5);

        button.setOnClickListener(new View.OnClickListener() {//返回按钮
            @Override
            public void onClick(View v) {
                Bundle bundle = getIntent().getExtras();
                ArrayList<username> userArrayList = (ArrayList<username>) bundle.getSerializable("key");
                Intent intent = new Intent(fwMainActivity.this,dtMainActivity.class);
                intent.putExtras(bundle);
                startActivityForResult(intent,1);
            }
        });
        bn1.setOnClickListener(new View.OnClickListener() {//学校要闻按钮
            @Override
            public void onClick(View v) {
                Bundle bundle = getIntent().getExtras();
                ArrayList<username> userArrayList = (ArrayList<username>) bundle.getSerializable("key");
                Intent intent = new Intent(fwMainActivity.this,xxywMainActivity.class);
                intent.putExtras(bundle);
                startActivityForResult(intent,1);
            }
        });
        bn3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Bundle bundle = getIntent().getExtras();
                ArrayList<username> userArrayList = (ArrayList<username>) bundle.getSerializable("key");
                Intent intent = new Intent(fwMainActivity.this,grzyMainActivity.class);
                intent.putExtras(bundle);
                startActivityForResult(intent,1);
            }
        });
        bu5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Bundle bundle = getIntent().getExtras();
                ArrayList<username> userArrayList = (ArrayList<username>) bundle.getSerializable("key");
                Intent intent = new Intent(fwMainActivity.this,jrMainActivity.class);
                intent.putExtras(bundle);
                startActivityForResult(intent,1);
            }
        });
    }
}
